package ch.jamme.model.rel1;

import ch.jamme.model.*;

public class OrderLine extends AbstractDomainObject {
	
	private Order order;
	
	private Item item;
	
	private int lineNr;
	
	private int quantity;
	
	private Type type = Type.NORMAL;

	public Order getOrder() {
		return order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}

	public Item getItem() {
		return item;
	}

	public void setItem(Item item) {
		this.item = item;
	}

	public int getLineNr() {
		return lineNr;
	}

	public void setLineNr(int lineNr) {
		this.lineNr = lineNr;
	}

	public int getQuantity() {
		return quantity;
	}

	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}
	
	public String getHumanReadableDescription() {
		return "Order Line no. "+getLineNr();
	}
	
	public Type getType() {
		return type;
	}
	
	public void setType(Type type) {
		this.type = type;
	}
	
	public enum Type {
		NORMAL, URGENT, EXPRESS;
	}

}
